<template>
  <el-button
    class="confirm-btn"
    type="primary"
    size="medium"
    @click="nextDeclareItem"
  >
    下一项
  </el-button>
</template>

<script>
export default {
  name: "DeclareNextItem",
  data() {
    return {};
  },
  methods: {
    nextDeclareItem() {
      let id = parseInt(this.$route.query.id);
      let typeId = parseInt(this.$route.query.typeId);
      let declareIndex = parseInt(this.$route.query.declareIndex);
      let policyId = parseInt(this.$route.query.policyId);
      if ((id || id == 0) && (typeId || typeId == 0) && declareIndex > -1) {
        this.$router.replace({
          path: "/user/enterprise/form",
          query: { id, typeId, declareIndex: declareIndex + 1, policyId },
        });
      }
    },
  },
};
</script>

<style lang="scss" scoped></style>
